import Mock from 'mockjs'
import home from './mock/home'
import user from './mock/user'
import permission from './mock/permission'


// 定义mock请求拦截
Mock.mock('/api/home/getData', home.getStatisticalData)
    // 拦截到请求后的处理数据
    // console.log('拦截到了')

// 用户列表的数据

Mock.mock('/api/user/add', 'post', user.createUser)
Mock.mock('/api/user/edit', 'post', user.updateUser)
Mock.mock('/api/user/del', 'post', user.deleteUser)

// Mock.mock('/api/user/getUser', user.getUserList)
Mock.mock(/api\/user\/getUser/, user.getUserList) // 正则

// 登录接口
Mock.mock(/api\/permission\/getMenu/, 'post', permission.getMenu)